from django.contrib import admin
from .models import Service,RoomOrder,Room,User,ServiceOrder
# Register your models here.

class ser(admin.ModelAdmin):
    fieldsets = (
        ['Main', {
            'fields': ('Sname', 'Sprice'),
        }],
        ['Advance', {
            'classes': ('collapse',),  # CSS
            'fields': ('Sdescribe',),
        }]
    )
    list_display = ('Sname', 'Sprice','Sdescribe')
    search_fields = ('Sname',)

class room(admin.ModelAdmin):
    list_display = ('Rprice','Rtype','Rstatus','Rnum')
    search_fields = ('Rnum','Rtype','Rstatus')

class user(admin.ModelAdmin):
    list_display = ('Uname','Utel')
    search_fields = ('Uname','Utel')

class room_oreder(admin.ModelAdmin):
    list_display = ('Rid','Uid','Identify','ROstatus','ROtime')
    search_fields = ('Rid','Uid','Identify')

class ser_order(admin.ModelAdmin):
    list_display = ('Sid','Uid','ROid','SOstatus')
    search_fields = ('Sid','Uid','ROid')

admin.site.register(ServiceOrder, ser_order)
admin.site.register(Service,ser)
admin.site.register(Room,room)
admin.site.register(User,user)
admin.site.register(RoomOrder,room_oreder)
